﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using QuickTasks.ViewModels.Properties;
using System.Collections.Generic;
using System.IO.IsolatedStorage;
using System.Xml.Linq;
using System.Linq;
using System.IO;
using System.Windows.Media.Imaging;


namespace QuickTasks.ViewModels.Data
{
    public class PanoramaBg
    {



        public List<PanoramaBgProp> GetBackGroundImages()
        {
            List<PanoramaBgProp> objImageList = new List<PanoramaBgProp>();
            using (QuickTaskDataContext context = new QuickTaskDataContext(App.ConnectionString))
            {
                var xquery = from a in context.Lback select a;
                            
              
                foreach (var item in xquery)
                {
                    PanoramaBgProp objimage = new PanoramaBgProp();
                    objimage.Id = item.id.ToString();
                    objimage.ImagePath = "/Images/smallPanoramaBgImages/" + item.imagename;
                    objimage.ImageName = item.imagename;
                    objImageList.Add(objimage);
                }
                return objImageList;
            }
        }

    }
}

